package com.foreverwin.mes.so.service;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.foreverwin.mes.core.base.FrontPage;
import com.foreverwin.mes.so.model.Recipe;
import com.foreverwin.mes.so.model.RecipeParam;
import com.foreverwin.mes.so.model.RecipeView;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Syngna
 * @since 2020-02-04
 */
public interface RecipeService extends IService<Recipe> {

    /**
     *  分页查询
     * @param frontPage
     * @return
     */
    Page<Recipe> selectPage(FrontPage<Recipe> frontPage, Recipe recipe);

    List<Recipe> selectList(Recipe recipe);

    List<RecipeParam> listParams(String site, String recipe, String revision);

    void add(String site, String user, String newRecipe, String newRecipeVer, String originRecipe, String originRecipeVer);

    void deleteParams(String user, RecipeView recipeView);

    void addParam(String site, String user, RecipeParam recipeParam);

    void updateParam(String site, String user, RecipeParam recipeParam);

    Recipe getRecipeInfo(String site, String item, String resource);
}